### Startup tricks
# BUGBUG find a better place

# Setup unicode
import sys, codecs
# Attention! Dirty hack!
# See http://blog.ianbicking.org/illusive-setdefaultencoding.html
reload(sys)
sys.setdefaultencoding('utf-8')
c = codecs.getwriter('koi8-r')
sys.stderr = c(sys.stderr, 'replace')
sys.stdout = c(sys.stdout, 'replace')
